<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>flex demo</title>
    <style>
        .wrapper{
            border:1px solid red;
            display: flex;
            flex-direction: row;
            justify-content: flex-end;
            align-items: center;
            align-content: flex-start;
        }
        div{
            width:200px;
            height: 200px;
            border:2px solid #ccc;
        }
        #div1{
            height:100px;
            flex-grow: 1;
            align-self:flex-end;
        }
        #div2{
            height: 300px;
            flex-grow: 1;
        }
    </style>
</head>
<body>
    <article class="wrapper">
        <div id="div1"></div>
        <div></div>
        <div></div>
        <div id="div2"></div>
    </article>
</body>
</html>